package com.newly.api.sys.feign;

import com.newly.common.base.constants.ServerUriConstant;
import com.newly.common.base.entity.R;
import com.newly.common.base.entity.sys.captcha.dto.CaptchaDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author gjm guan
 * @date 2021/9/12 10:28
 * @desc 鉴权api
 */
@Api(tags = "鉴权api")
@FeignClient(path = ServerUriConstant.NEWLY_SYS_AUTH, name = ServerUriConstant.NEWLY_SYS_SERVICE_NAME)
public interface AuthClient {

    @ApiOperation("登出")
    @PostMapping("/logout")
    R logout();

    @ApiOperation("获取图形验证码")
    @GetMapping("/captcha")
    R captcha();

    @ApiOperation("校验图形验证码")
    @PostMapping("/checkCaptcha")
    R checkCaptcha(@RequestBody CaptchaDto captchaDto);

    @ApiOperation("扫描所有的api接口")
    @GetMapping("/queryApis")
    R queryApis();

}
